﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;

namespace FierceWar
{
	public class Bullet : ElementalModel
	{
		private Vector3 _direction;

		public bool IsOutsideRange
		{
			get
			{
				if ((Position.X < -65536.0f) || (Position.X > 65536.0f) ||
					(Position.Y < -65536.0f) || (Position.Y > 65536.0f) ||
					(Position.Z < -65536.0f) || (Position.Z > 65536.0f))
				{
					return true;
				}

				return false;
			}
		}

		public Bullet(ContentManager content, ModelType modelType,
			Vector3 position, Vector3 rotation, Vector3 direction)
			: base(content, modelType)
		{
			Position = position;
			Rotation = rotation;
			_direction = direction;
		}

		public void Update()
		{
			Position += _direction * 3000.0f;
		}
	}
}
